home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1995 January
/
Simtel - 10000 MSDOS Shareware Programs (Walnut Creek)(January 1995)(Disc 2).ISO
/
disc2
/
diskutil
/
addrive.bat
< prev
next >
Wrap
DOS Batch File
|
1989-08-25
|
2KB
|
51 lines
Date: Mon, 01 Dec 86 12:30:24 CST
From: CCRJW%UMCVMB.BITNET@WISCVM.WISC.EDU (Richard Winkel UMC
Computing Services)
To: INFO-IBMPC@USC-ISIC.ARPA
Subject: Program submission
ADDRIVE.BAT:
rem This .BAT file will create ADDRIVE.COM. ADDRIVE is used with the
rem SUPERDRIVE ramdisk from AST. Normally, you must open the system
rem unit and reset switches on the motherboard to use SUPERDRIVE.
rem ADDRIVE resets the 'switches' in RAM, so no hardware switching is
rem required. The initial run of ADDRIVE will cause the system to
rem reboot, so addrive should be the first command in your autoexec.
rem Example: ADDRIVE C:
rem SUPERDRV C:/M=180
rem
debug addrive.com <addrive.bat
goto end
a 100
MOV AL,[005C] ; get first byte of fcb1
OR AL,AL ; was a drive specified?
JZ 010B ; no, print msg & exit
CMP AL,04 ; is it <= D: ?
JBE 0114 ; if so, process it
MOV DX,0136 ; else print msg & exit
MOV AH,09 ; print msg
INT 21
INT 20 ; exit
DEC AL ; dec drive number
MOV CL,06 ; shift it left 6 bits
SHL AL,CL
XOR DX,DX ; get to the bottom of memory
MOV DS,DX
MOV AH,[0410] ; get equipment flag
AND AH,C0 ; isolate relevant bits
CMP AH,AL ; is this drive already defined?
JB 012B ; if not, then define it
INT 20 ; else exit
AND BYTE PTR [0410],3F ; reset 'switches'
OR [0410],AL
INT 19 ; and reboot
e 136 'You must supply a drive specifier.$'
rcx
60
w
q
:end
[ADDRIVE.BAT has been added to the Info-IBMPC Library. -rag]